# utils/report_generator.py
import configparser
from pathlib import Path

import pytest
from config.config import REPORTS_HTML_PATH, REPORTS_ALLURE_PATH


def generate_html_report():
    """生成 HTML 报告"""
    report_path = REPORTS_HTML_PATH
    pytest.main(["-v", "--html", report_path])
    return report_path


def generate_allure_report():
    """生成 Allure 报告"""
    allure_dir = REPORTS_ALLURE_PATH
    pytest.main(["-v", "--alluredir", allure_dir])
    return allure_dir
